package com.course.spring.mvc;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

//@Controller
//@RequestMapping("/employee")
//public class MyControllerOld {
//
//    @RequestMapping("/")
//    public String showFirstView() {
//        return "first-view";
//    }
//
//    @RequestMapping("/askDetails")
//    public String askEmployeeDetail(){
//        return "ask-emp-details-view";
//    }
//
////    @RequestMapping("showDetails")
////    public String showEmpDetails(){
////        return "show-emp-details-view";
////    }
//
////    @RequestMapping("/showDetails")
////    public String showEmpDetails(HttpServletRequest request, Model model){
////
////        String empName = request.getParameter("employeeName");
////        empName = "Mr. " + empName;
////        model.addAttribute("nameAttribute", empName);
////
////        model.addAttribute("description", "YouTube streamer");
////
////
////        return "show-emp-details-view";
////    }
//
//    @RequestMapping("/showDetails")
//    public String showEmpDetails(@RequestParam("employeeName") String empName
//            , Model model){
//
//        //* @RequestParam String empName = request.getParameter("employeeName");
//        empName = "Mr. " + empName + " Detrov";
//        model.addAttribute("nameAttribute", empName);
//
//        model.addAttribute("description", "YouTube streamer");
//
//
//        return "show-emp-details-view";
//    }
//}
